package com.topgay.domain;

import java.io.Serializable;
import java.util.Date;

public class ChattingMessage implements Serializable{
	
	private int	   chattingSeq;
	private int	   timeLineSeq;
	private String timeLineName;
	private String picturePath;
	private String message;
	private String fromNickname;
	private String toNickname;
	private String fromId;
	private String toId;
	private String time;

	public ChattingMessage(int timeLineSeq, int chattingSeq, String timeLineName,
			String picturePath, String message, String fromNickname,
			String toNickname, String fromId, String toId, String time) {
		super();
		this.timeLineSeq = timeLineSeq;
		this.chattingSeq = chattingSeq;
		this.timeLineName = timeLineName;
		this.picturePath = picturePath;
		this.message = message;
		this.fromNickname = fromNickname;
		this.toNickname = toNickname;
		this.fromId = fromId;
		this.toId = toId;
		this.time = time;
	}
	
	public int getChattingSeq() {
		return chattingSeq;
	}

	public void setChattingSeq(int chattingSeq) {
		this.chattingSeq = chattingSeq;
	}

	public ChattingMessage() {
		super();
	}

	public int getTimeLineSeq() {
		return timeLineSeq;
	}

	public void setTimeLineSeq(int timeLineSeq) {
		this.timeLineSeq = timeLineSeq;
	}

	public String getTimeLineName() {
		return timeLineName;
	}

	public void setTimeLineName(String timeLineName) {
		this.timeLineName = timeLineName;
	}

	public String getPicturePath() {
		return picturePath;
	}

	public void setPicturePath(String picturePath) {
		this.picturePath = picturePath;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getFromNickname() {
		return fromNickname;
	}

	public void setFromNickname(String fromNickname) {
		this.fromNickname = fromNickname;
	}

	public String getToNickname() {
		return toNickname;
	}

	public void setToNickname(String toNickname) {
		this.toNickname = toNickname;
	}

	public String getFromId() {
		return fromId;
	}

	public void setFromId(String fromId) {
		this.fromId = fromId;
	}

	public String getToId() {
		return toId;
	}

	public void setToId(String toId) {
		this.toId = toId;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	@Override
	public String toString() {
		return "ChattingMessage [timeLineSeq=" + timeLineSeq
				+ ", timeLineName=" + timeLineName + ", picturePath="
				+ picturePath + ", message=" + message + ", fromNickname="
				+ fromNickname + ", toNickname=" + toNickname + ", fromId="
				+ fromId + ", toId=" + toId + ", time=" + time + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((fromId == null) ? 0 : fromId.hashCode());
		result = prime * result
				+ ((fromNickname == null) ? 0 : fromNickname.hashCode());
		result = prime * result + ((message == null) ? 0 : message.hashCode());
		result = prime * result
				+ ((picturePath == null) ? 0 : picturePath.hashCode());
		result = prime * result + ((time == null) ? 0 : time.hashCode());
		result = prime * result
				+ ((timeLineName == null) ? 0 : timeLineName.hashCode());
		result = prime * result + timeLineSeq;
		result = prime * result + ((toId == null) ? 0 : toId.hashCode());
		result = prime * result
				+ ((toNickname == null) ? 0 : toNickname.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ChattingMessage other = (ChattingMessage) obj;
		if (fromId == null) {
			if (other.fromId != null)
				return false;
		} else if (!fromId.equals(other.fromId))
			return false;
		if (fromNickname == null) {
			if (other.fromNickname != null)
				return false;
		} else if (!fromNickname.equals(other.fromNickname))
			return false;
		if (message == null) {
			if (other.message != null)
				return false;
		} else if (!message.equals(other.message))
			return false;
		if (picturePath == null) {
			if (other.picturePath != null)
				return false;
		} else if (!picturePath.equals(other.picturePath))
			return false;
		if (time == null) {
			if (other.time != null)
				return false;
		} else if (!time.equals(other.time))
			return false;
		if (timeLineName == null) {
			if (other.timeLineName != null)
				return false;
		} else if (!timeLineName.equals(other.timeLineName))
			return false;
		if (timeLineSeq != other.timeLineSeq)
			return false;
		if (toId == null) {
			if (other.toId != null)
				return false;
		} else if (!toId.equals(other.toId))
			return false;
		if (toNickname == null) {
			if (other.toNickname != null)
				return false;
		} else if (!toNickname.equals(other.toNickname))
			return false;
		return true;
	}
	
	
	
}
